﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Serialization;
using System.IO;
using System.Xml;

namespace planning
{
    class Program
    {
        static void Main(string[] args)
        {
            XmlDocument document = new XmlDocument();
            document.Load("..\\..\\planning.xml");

            Planning p = Planning.fromXml(document.SelectSingleNode("/Planning"));



            document = new XmlDocument();
            document.AppendChild(p.toXml(document));
            XmlWriterSettings settings = new XmlWriterSettings();
            settings.Indent = true;
            settings.IndentChars = "\t";
            settings.NewLineChars = "\r\n";
            settings.NewLineHandling = NewLineHandling.Replace;
            using (XmlWriter writer = XmlWriter.Create("..\\..\\planning-saved.xml", settings))
            {
                document.Save(writer);
            }

            int truc;

            truc = 5;
        }
    }
}
